package com.atmilan.quartz.constant.enums;

import com.baomidou.mybatisplus.core.enums.IEnum;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;

/**
 * 商品类型
 * @Description:
 * @author daigb
 * @date 2021-01-15
 */
public enum CategoryTypeEnum implements IEnum<Integer> {
    /**
     * 寻物
     */
    XUNWU(1, "寻物"),
    /**
     * 欧洲
     */
    EUROPE(2, "EUROPE"),
    /**
     * buyer
     */
    BUYER(3, "buyer"),
    /**
     * Tmall
     */
    TMALL(4, "天猫"),
    /**
     * IM
     */
    IM(5, "IM"),
    /**
     * XYY
     */
    XYY(6, "XYY"),
    /**
     * JKY
     */
    JKY(8, "JKY"),
    /**
     * VIETTI
     */
    VIETTI(9, "VIETTI"),
    /**
     * COLTORTI
     */
    COLTORTI(21, "COLTORTI"),
    /**
     * LEAM
     */
    LEAM(22, "LEAM"),
    /**
     * BELLETTINI
     */
    BELLETTINI(23, "BELLETTINI"),

    /**
     * GB
     */
    GB(24, "GB"),

    /**
     * CAROTTA
     */
    CAROTTA(25, "CAROTTA"),

    /**
     * FOLLI
     */
    FOLLI(27, "FOLLI"),

    /**
     * DELLOGLIO
     */
    DELLOGLIO(28, "DELLOGLIO"),

    /**
     * ORANGE
     */
    ORANGE(29, "ORANGE"),
    
    /**
     * UNIBUY境外商品
     */
    UNIBUY(31, "UNIBUY境外商品"),

    /**
     * UNIBUY境内商品
     */
    UNIBUY1(35, "UNIBUY境内商品"),

    /**
     * jst
     */
    JST(32, "jst"),

    /**
     * LAVITA
     */
    LAVITA(41, "LAVITA"),

    /**
     * PURE
     */
    PURE(42, "PURE"),
    
    /**
     * EFASION
     */
    EFASION(46, "EFASION"),

    JULIAN(58, "la vita-paolo"),

    DAIGO(62, "daigo"),
    HIQER(66, "hiqer"),
    ;

    private final Integer code;
    private final String msg;

    CategoryTypeEnum(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public Integer getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }

    @JsonCreator
    public static CategoryTypeEnum valueOf(Integer code) {
        for (CategoryTypeEnum value : values()) {
            if (code.equals(value.getCode())) {
                return value;
            }
        }
        return CategoryTypeEnum.XUNWU;
    }

    @Override
    @JsonValue
    public Integer getValue() {
        return code;
    }

}

